import React from 'react'
import Admin from './page/admin'
import Login from './page/login'
import {Switch,Redirect,Route} from 'react-router-dom'
import {store} from './store'
import {Provider} from 'react-redux'

export default function App() {
  return (<Provider store={store}>
    <div>
      <Switch>
        <Route path='/admin' component={Admin}/>
        <Route path='/login' component={Login}/>
        <Redirect from='/' to='/admin'/>
      </Switch>
    </div>
  </Provider>)
}
